package de.tum.beilmeiner.template;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.TextBoxBase;
import com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.PasswordTextBox;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class GuiTemplateLoginWindow implements EntryPoint {

	public void onModuleLoad() {

		// Add the nameField and sendButton to the RootPanel
		// Use RootPanel.get() to get the entire body element
		RootPanel rootPanel = RootPanel.get("nameFieldContainer");
		
		Image image = new Image((String) null);
		rootPanel.add(image, 0, 0);
		image.setSize("100%", "100%");
		
		Button btnLogin = new Button("Login");
		rootPanel.add(btnLogin, 140, 173);
		btnLogin.setSize("82px", "30px");
		
		Button btnRegister = new Button("Register");
		rootPanel.add(btnRegister, 228, 173);
		btnRegister.setSize("82px", "30px");
		
		PasswordTextBox txtbxPassword = new PasswordTextBox();
		txtbxPassword.setTextAlignment(TextBoxBase.ALIGN_LEFT);
		txtbxPassword.setDirectionEstimator(true);
		txtbxPassword.setAlignment(TextAlignment.LEFT);
		txtbxPassword.setText("Password");
		rootPanel.add(txtbxPassword, 140, 133);
		txtbxPassword.setSize("160px", "18px");
		
		TextBox txtbxUsername = new TextBox();
		txtbxUsername.setAlignment(TextAlignment.CENTER);
		txtbxUsername.setDirectionEstimator(false);
		txtbxUsername.setTextAlignment(TextBoxBase.ALIGN_LEFT);
		txtbxUsername.setText("Username");
		rootPanel.add(txtbxUsername, 140, 93);
		txtbxUsername.setSize("160px", "18px");

	

	}
}
